<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script data-th-replace="~{public::layui}"></script>
    <style>
        .layui-form .layui-form-label {
            width: auto !important;
        }
    </style>
</head>
<body>

<!--region 查询条件部分-->
<form>
    <div class="layui-form">
        <div class="layui-inline">
            <div class="layui-form-label">角色名称:</div>
            <div class="layui-input-inline">
                <input type="text" name="name" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-form-label">角色代码:</div>
            <div class="layui-input-inline">
                <input type="text" name="code" class="layui-input">
            </div>

        </div>
        <div class="layui-inline">
            <button type="submit" lay-filter="search" lay-submit class="layui-btn"><i
                    class="layui-icon layui-icon-search"></i></button>
        </div>
    </div>
</form>
<!--endregion-->
<table class="layui-table" id="LAY_TABLE" lay-filter="TABLE_ACTION"></table>
<!--region 行工具-->
<template id="action_row">
    <button data-th-if="${session.RESOURCES.contains('ROLE_DEL')} or ${session.ROLE.contains('ADMIN')}" type="button"
            title="删除" lay-event="del" class="layui-btn layui-btn-xs layui-btn-danger"><i
            class="layui-icon layui-icon-delete"></i></button>
    <button data-th-if="${session.RESOURCES.contains('ROLE_UPDATE')} or ${session.ROLE.contains('ADMIN')}" type="button"
            title="修改" lay-event="update" class="layui-btn layui-btn-xs layui-btn-normal"><i
            class="layui-icon layui-icon-edit"></i></button>
    <button data-th-if="${session.RESOURCES.contains('ROLE_RESOURCE_MAPPING')} or ${session.ROLE.contains('ADMIN')}" type="button"
            title="关联资源" lay-event="resourceMapping" class="layui-btn layui-btn-xs layui-btn-normal"><i
            class="layui-icon layui-icon-link"></i></button>
</template>
<!--endregion-->
<!--region 头工具-->
<template id="toolbar">
    <button data-th-if="${session.RESOURCES.contains('ROLE_ADD')} or ${session.ROLE.contains('ADMIN')}"
            class="layui-btn layui-btn-normal" lay-event="add"><i class="layui-icon layui-icon-addition"></i>新增
    </button>
    <button data-th-if="${session.RESOURCES.contains('ROLE_DEL')} or ${session.ROLE.contains('ADMIN')}"
            class="layui-btn layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete"></i>批量删除
    </button>
</template>
<!--endregion-->

<script data-th-replace="~{public::js('role','角色','index')}"></script>
</body>
</html>